package com.ruoyi.web.admin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.admin.mapper.TdmHouXuanYaoWuKuMapper;
import com.ruoyi.web.admin.domain.TdmHouXuanYaoWuKu;
import com.ruoyi.web.admin.service.ITdmHouXuanYaoWuKuService;

/**
 * 候选药物库Service业务层处理
 * 
 * @author ly
 * @date 2022-03-11
 */
@Service
public class TdmHouXuanYaoWuKuServiceImpl implements ITdmHouXuanYaoWuKuService 
{
    @Autowired
    private TdmHouXuanYaoWuKuMapper tdmHouXuanYaoWuKuMapper;

    /**
     * 查询候选药物库
     * 
     * @param id 候选药物库主键
     * @return 候选药物库
     */
    @Override
    public TdmHouXuanYaoWuKu selectTdmHouXuanYaoWuKuById(Long id)
    {
        return tdmHouXuanYaoWuKuMapper.selectTdmHouXuanYaoWuKuById(id);
    }

    /**
     * 查询候选药物库列表
     * 
     * @param tdmHouXuanYaoWuKu 候选药物库
     * @return 候选药物库
     */
    @Override
    public List<TdmHouXuanYaoWuKu> selectTdmHouXuanYaoWuKuList(TdmHouXuanYaoWuKu tdmHouXuanYaoWuKu)
    {
        return tdmHouXuanYaoWuKuMapper.selectTdmHouXuanYaoWuKuList(tdmHouXuanYaoWuKu);
    }

    /**
     * 新增候选药物库
     * 
     * @param tdmHouXuanYaoWuKu 候选药物库
     * @return 结果
     */
    @Override
    public int insertTdmHouXuanYaoWuKu(TdmHouXuanYaoWuKu tdmHouXuanYaoWuKu)
    {
        tdmHouXuanYaoWuKu.setCreateTime(DateUtils.getNowDate());
        return tdmHouXuanYaoWuKuMapper.insertTdmHouXuanYaoWuKu(tdmHouXuanYaoWuKu);
    }

    /**
     * 修改候选药物库
     * 
     * @param tdmHouXuanYaoWuKu 候选药物库
     * @return 结果
     */
    @Override
    public int updateTdmHouXuanYaoWuKu(TdmHouXuanYaoWuKu tdmHouXuanYaoWuKu)
    {
        tdmHouXuanYaoWuKu.setUpdateTime(DateUtils.getNowDate());
        return tdmHouXuanYaoWuKuMapper.updateTdmHouXuanYaoWuKu(tdmHouXuanYaoWuKu);
    }

    /**
     * 批量删除候选药物库
     * 
     * @param ids 需要删除的候选药物库主键
     * @return 结果
     */
    @Override
    public int deleteTdmHouXuanYaoWuKuByIds(Long[] ids)
    {
        return tdmHouXuanYaoWuKuMapper.deleteTdmHouXuanYaoWuKuByIds(ids);
    }

    /**
     * 删除候选药物库信息
     * 
     * @param id 候选药物库主键
     * @return 结果
     */
    @Override
    public int deleteTdmHouXuanYaoWuKuById(Long id)
    {
        return tdmHouXuanYaoWuKuMapper.deleteTdmHouXuanYaoWuKuById(id);
    }
}
